package com.imesne.office.excel.write;

import com.imesne.office.excel.model.ExcelBook;
import com.imesne.office.excel.model.ExcelCell;
import com.imesne.office.excel.model.ExcelRow;
import com.imesne.office.excel.model.ExcelSheet;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;

/**
 * Excel写入扩展处理接口
 * <p>
 * Created by liyd on 17/7/12.
 */
public interface ExcelWriteProcessor {

    /**
     * 处理Workbook
     *
     * @param excelBook
     * @param workbook
     */
    void processWorkbook(ExcelBook excelBook, Workbook workbook);

    /**
     * 处理Sheet
     *
     * @param excelSheet
     * @param sheet
     * @param workbook
     * @param count
     */
    void processSheet(ExcelSheet excelSheet, Sheet sheet, Workbook workbook, int count);

    /**
     * 处理title Row
     *
     * @param excelRow
     * @param row
     * @param workbook
     * @param sheet
     */
    void processTitleRow(ExcelRow excelRow, Row row, Workbook workbook, Sheet sheet);

    /**
     * 处理Row
     *
     * @param excelRow
     * @param row
     * @param workbook
     * @param sheet
     */
    void processRow(ExcelRow excelRow, Row row, Workbook workbook, Sheet sheet);

    /**
     * 处理Cell
     *
     * @param excelCell the excel cell
     * @param cell      the cell
     * @param workbook  the workbook
     * @param sheet     the sheet
     * @param row       the row
     */
    void processCell(ExcelCell excelCell, Cell cell, Workbook workbook, Sheet sheet, Row row);
}
